import { Component } from 'vue-facing-decorator'
import Render from '@/render/Render'
import toNative from '@/utils/toNative'
import TableRender, { type TableRenderColumnTypes } from '@/render/TableRender'
import type { ReportCaseResultDto } from '@/api/insurance/period/types'
import type { VxeColumnSlotTypes } from 'vxe-table'
import ToolTipText from '@/components/tooltip-text/Index'
@Component
export class DiscountRecordView extends TableRender {
    noTablePadding = true
    noFilterPadding = true
    filterConfig() {
        return {
            companyId: {
                name: '优惠记录日期',
                element: 'datetime',
            }
        }
    }
    tableColumnConfigOld = () => [
        {
            field: 'id',
            title: '1-3类优惠金额',
        },{
            field: 'id',
            title: '4类优惠金额',
        },{
            field: 'id',
            title:'5类优惠金额'
        },{
            field: 'id',
            title:'生效时间'
        },{
            field: 'id',
            title:'方案名称'
        },{
            field: 'id',
            title: '操作人',
            slots: {
                default: (({ row, column }: VxeColumnSlotTypes.ContentSlotParams) => { 
                    return <div class="text-blue-100">
                        <ToolTipText text="曹海玲" content="1311111111" />
                    </div>
                })
            }

        },{
            field: 'id',
            title:'状态'
        },{
            field: 'id',
            title:'操作时间'
        },{
            field: 'id',
            title:'操作'
        }
    ] as TableRenderColumnTypes<ReportCaseResultDto>
    render() {
        return (
            <div class="md:flex md:flex-col h-full">
                {this.renderFilter()}
                {this.renderTable()}
                {this.renderPager()}
            </div>
        )
    }
}

export default toNative<{}, {}>(DiscountRecordView)